import { defineStore } from 'pinia'
import { ref } from 'vue';


const useUserInfoStore = defineStore('userInfo', () => {

  //定义一个
  const info = ref({})

  const setInfo = (newInfo) => {
    info.value = newInfo
  }

  //清空
  const removeInfo = () => {
    info.value = {}
  }
  return { info, setInfo, removeInfo }

}, { persist: true })

export default useUserInfoStore;